package classes.form {
	import classes.Label;

	import flash.display.Sprite;

	/**
	 * @author dennis
	 */
	public class SelectEntry extends Sprite{
		
		private var value:String;
		private var label:String;
		
		private var bg:Sprite;
		
		public function SelectEntry(value:String, name:String):void{
			this.mouseChildren = false;
			this.buttonMode = true;
			this.value = value;
			this.label = name;
			create();
		}
		
		private function create():void{
			this.bg = new Sprite();
			this.bg.graphics.beginFill(0x666666);
			this.bg.graphics.drawRect(0, 0, 100, 15);	
			this.bg.graphics.endFill();
			this.bg.alpha = 0;
			this.addChild(this.bg);
			
			var EntryLabel:Label = new Label(this.label);
			EntryLabel.generate(10, 0x000000);
			this.addChild( EntryLabel );
		}
		
		public function rollover():void{
			this.bg.alpha = 1;
		}
		
		public function rollout():void{
			this.bg.alpha = 0;
		}
		
		public function getValue():String{
			return this.value;
		}
		
		public function getText():String{
			return this.label;
		}
	}
}
